﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using agvcontroller.Control;

namespace agvcontroller.GUI
{
    /// <summary>
    /// Interaction logic for UCVehicleViewerStack.xaml
    /// </summary>
    public partial class UCVehicleViewerStack : UserControl
    {
        CVehicleDic VehicleDic = CVehicleDic.getInstance();

        public UCVehicleViewerStack()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            InitUI();
        }

        void InitUI()
        {
            foreach (KeyValuePair<int, CVehicle> vehicle in VehicleDic)
            {
                UCVehicleViewer vehicleViewer = new UCVehicleViewer(vehicle.Value);

                stkVehicleViewer.Children.Add(vehicleViewer);

            }
        }
    }
}
